package com.company.clientscard.shared.requestfactory;

import java.util.List;

import com.company.clientscard.server.service.ClientController;
import com.company.clientscard.server.service.DaoLocator;
import com.company.clientscard.shared.proxy.ClientProxy;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.RequestFactory;
import com.google.web.bindery.requestfactory.shared.Service;

public interface ClientsRequestFactory extends RequestFactory {

	@Service(value = ClientController.class, locator = DaoLocator.class)
	public interface ClientRequestContext extends RequestContext {
		Request<ClientProxy> findById(Long id);

		Request<Void> save(ClientProxy client);

		Request<List<ClientProxy>> findAll();

		Request<List<ClientProxy>> findAll(int firstRow, int numberOfRows);

		Request<ClientProxy> update(ClientProxy client);
	}

	ClientRequestContext context();
}
